package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 活动实体类
 * 对应PHP的discount/Active.php
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("yoshop_discount_active")
@Schema(description = "活动实体")
public class DiscountActive extends BaseModel {

    /**
     * 活动ID
     */
    @TableId(value = "discount_id", type = IdType.AUTO)
    @Schema(description = "活动ID")
    private Long discountId;

    /**
     * 活动名称
     */
    @TableField("title")
    @Schema(description = "活动名称")
    private String title;

    /**
     * 活动单价
     */
    @TableField("price")
    @Schema(description = "活动单价")
    private BigDecimal price;

    /**
     * 数量（起订数量）
     */
    @TableField("set_num")
    @Schema(description = "数量（起订数量）")
    private Integer setNum;

    /**
     * 状态：10显示，20隐藏
     */
    @TableField("status")
    @Schema(description = "状态：10显示，20隐藏")
    private Integer status;

    /**
     * 是否删除
     */
    @TableField("is_delete")
    @Schema(description = "是否删除")
    @TableLogic
    private Integer isDelete;

    /**
     * 小程序ID
     */
    @TableField("wxapp_id")
    @Schema(description = "小程序ID")
    private Long wxappId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Long createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private Long updateTime;
} 